import msb.platto.fingerprint.*
class Incident implements Comparable {
    static belongsTo = [opRiskProcess:OpRiskProcess]
    String description
    String cause
    String solution
    String financialLoss
    String nonFinancialLoss
    Date   dateIncident
    String name
    String branch
    Cause reason
    Event event
    String retrieval
    User createdBy
    String incidentType
	String fileName
    static mapping = {
        sort 'id'
    }
    static constraints = {
        description maxSize:10000,nullable:true
        cause maxSize:10000,nullable :true
        solution maxSize:10000,nullable :true
        financialLoss maxSize:10000,nullable :true
        nonFinancialLoss maxSize:10000,nullable :true
        dateIncident nullable:true
        name nullable:true
        branch nullable:true
        opRiskProcess nullable:true
        reason nullable:true
        event nullable:true
        retrieval nullable:true
        incidentType nullable:true
        createdBy nullable:true
		fileName nullable:true
    }

    int compareTo(o) {
        if(!id) return 1
        return this.id.compareTo(o.id)
    }
}
